﻿using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RoadFloat : MonoBehaviour
{
    public Data[] datas;
    public int time = 2;

    [System.Serializable]
    public struct Data
    {
        public Transform @object;
        public Transform target;
    }

    public void Invoke()
    {
        foreach (var item in datas)
        {
            item.@object.DOMove(item.target.position, time).SetEase(Ease.InOutCubic);
        }
    }
}
